package com.example.sinoyd.frameapplication.ProjectCodes.Fragment

import android.annotation.SuppressLint
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.example.sinoyd.frameapplication.KotlinFrame.Uitl.BaiduMapControl
import com.example.sinoyd.frameapplication.R
import kotlinx.android.synthetic.main.gis_fragment.*
import kotlinx.android.synthetic.main.include_title_layout.*
import org.jetbrains.anko.act
import org.jetbrains.anko.toast

/**
 * GIS监控界面
 * **/
@SuppressLint("ValidFragment")
class GisFragment(var name: String = "GIS监控") : BaseFragment() {
    var baiducontrol: BaiduMapControl? = null


    //选择站点后进行的操作
    override fun selectPortCallBack() {
        toast("选择站点后一系列请求")
    }


    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        val conview = inflater.inflate(R.layout.gis_fragment, null)
        return conview
    }

    override fun onViewCreated(view: View?, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        baiducontrol = BaiduMapControl(act, bmapView)
        //定位自己
        baiducontrol!!.requestLocation()
        setview()
        setlisterens()
    }


    //设置界面
    private fun setview() {
        center_title.text = name

    }

    //设置各种监听
    private fun setlisterens() {}


}